package com.daigoudao.web.dao;

import java.util.List;

import com.daigoudao.web.model.SimpleBuyModel;
import com.daigoudao.web.model.WantBuyModel;

public interface IWantBuyDao {

	/**
	 * 添加求购信息
	 * 
	 * @param wantBuyModel
	 */
	public void addWantBuy(WantBuyModel wantBuyModel) throws Exception;

	/**
	 * 查询求购信息
	 * 
	 * @param wantBuyModel
	 * @return
	 * @throws Exception
	 */
	public List<WantBuyModel> queryWantBuys(WantBuyModel wantBuyModel)
			throws Exception;

	/**
	 * 查询我发布的求购信息
	 * 
	 * @param wantBuyModel
	 * @return
	 * @throws Exception
	 */
	public List<WantBuyModel> queryMyWantBuys(WantBuyModel wantBuyModel)
			throws Exception;
	
	
	/**
	 * 查询我的搭车信息
	 * 
	 * @param wantBuyModel
	 * @return
	 * @throws Exception
	 */
	public List<SimpleBuyModel> queryMySimpleBuys(SimpleBuyModel simpleBuyModel)
			throws Exception;
	
	public int getMySimpleBuyCount(SimpleBuyModel simpleBuyModel) throws Exception;

	/**
	 * 获取求购信息数量
	 * 
	 * @param wantBuyModel
	 * @return
	 */
	public int getWantBuyCount(WantBuyModel wantBuyModel) throws Exception;

	public int getMyWantBuyCount(WantBuyModel wantBuyModel) throws Exception;
	
	
	/**
	 * 更新搭车状态
	 */
	public void updateSimpleBuyStatus(SimpleBuyModel simpleBuyModel)throws Exception;

	/**
	 * 查询求购详情
	 * 
	 * @param wantId
	 * @return
	 * @throws Exception
	 */
	public WantBuyModel queryWantBuyDetail(int wantId) throws Exception;

	public List<WantBuyModel> getNewWantBuyList() throws Exception;

	public List<WantBuyModel> queryOtherWantBuys(WantBuyModel wantBuyModel)
			throws Exception;

	public void updateStatus(WantBuyModel wantBuyModel) throws Exception;
}
